<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>测试</title>
    
</head>
<body>
<div>我来测试了</div>
</body>
    <script type="text/javascript">
        // 假设服务端ip为127.0.0.1
        
        ws = new WebSocket("wss://job.imacco.me/wss:7272");
        ws.onopen = function() {
            alert("连接成功");
            ws.send({ "content": "1234567890", "from_client_id": "66","from_client_name":"biu~","from_client_avatarurl":"https://wx.qlogo.cn/mmopen/vi_32/oeAyOyXDUsemHdssE8CsMEBM5b0GiaAsrzDN1WVztia7cHdSNib0piaHywoeGaaviawC3u4eSNkzbU2Fhv4vqPkzB4A/132","to_client_id": "60", "to_client_name": "陈建豪","to_client_avatarurl": "https://wx.qlogo.cn/mmhead/6jeAEfNSbrsL37q2872icmXjuibDIt1MRcfkJuhVfVx8U/132"});
            alert("给服务端发送一个字符串：tom");
        };
        ws.onmessage = function(e) {
            console.log("收到服务端的消息：" + e.data);
        };
    </script>

</html>
